package cz.data.common.annotation;

import java.lang.annotation.*;

@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DataInner {

    Access value() default Access.authenticated;

    enum Access {
        authenticated("authenticated", "需要授权"),
        permitAll("permitAll", "访问不鉴权"),
        anonymous("anonymous", "匿名访问");

        private final String value;
        private final String title;

        Access(String value, String title) {
            this.value = value;
            this.title = title;
        }

        public String getValue() {
            return value;
        }

        public String getTitle() {
            return title;
        }
    }
}
